package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.WorkerCertificationAuditResDTO;
import com.jzo2o.customer.service.IWorkerCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description WorkerAuditController
 * @Author jzh
 * @Date 2025-08-06  17:12
 */

@Slf4j
@RestController("operationWorkerCertificationAuditController")
@RequestMapping("/operation/worker-certification-audit")
@Api(tags = "运营端 - 服务人员认证审核相关接口")
public class WorkerCertificationAuditController {

    @Resource
    private IWorkerCertificationAuditService workerCertificationAuditService;

    @ApiOperation("审核服务人员认证分页查询")
    @GetMapping("/page")
    public PageResult<WorkerCertificationAuditResDTO> pageQueryWorkerAudit(WorkerCertificationAuditPageQueryReqDTO workerCertificationAuditPageQueryReqDTO){
        return workerCertificationAuditService.pageQueryWorkerAudit(workerCertificationAuditPageQueryReqDTO);
    }

    @ApiOperation("审核服务人员认证")
    @PutMapping("/audit/{id}")
    public void audit(@PathVariable Long id, CertificationAuditReqDTO certificationAuditReqDTO){
        workerCertificationAuditService.audit(id,certificationAuditReqDTO);
    }
}
